package com.ruoyi.paipan.data;

import com.alibaba.fastjson2.JSON;
import com.ruoyi.paipan.utils.HolidayUtil;

import java.io.IOException;
import java.io.InputStream;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Properties;

/**
 * 基础数据字符串
 */
public class StaticDataString {
    /**
     * 从配置文件中读取静态数据
     * @param key
     * @return
     */
    public static String readFromProperties(String key)
    {
        Properties properties = new Properties();
        try {
            InputStream inputStream = HolidayUtil.class.getClassLoader().getResourceAsStream("init.data");
            properties.load(inputStream);
            return properties.getProperty(key,"");
        } catch (IOException e) {
            return "";
        }
    }


}
